package com.xian;

import java.util.Properties;

public class JavaTest {
    public static void main(String[] args) throws Exception {
        System.out.println("java test");

        String userCountry = System.getProperty("user.country");
        System.out.println("userCountry="+userCountry);

        //路径分隔符   windows - ;        linux - :
        String pathSeparator = System.getProperty("path.separator");
        System.out.println("pathSeparator="+pathSeparator);

        //换行符   windows \r\n         linux \n
        String lineSeparator = System.getProperty("line.separator");
        System.out.println("lineSeparator=|"+lineSeparator+"|");


        String userDir = System.getProperty("user.dir");
        System.out.println("userDir="+userDir);

        String userHome = System.getProperty("user.home");
        System.out.println("userHome="+userHome);

        String fileEncoding = System.getProperty("file.encoding");
        System.out.println("fileEncoding="+fileEncoding);

        String userName = System.getProperty("user.name");
        System.out.println("userName="+userName);

        String javaHome = System.getProperty("java.home");
        System.out.println("javaHome="+javaHome);

        String userLanguage = System.getProperty("user.language");
        System.out.println("userLanguage="+userLanguage);

        String javaVersion = System.getProperty("java.version");
        System.out.println("javaVersion="+javaVersion);

        String osName = System.getProperty("os.name");
        System.out.println("osName="+osName);


        Properties properties = System.getProperties();
        properties.list(System.out);

    }
}
